package com.dongdongshop.service.impl;

import com.dongdongshop.mapper.TbCitiesMapper;
import com.dongdongshop.pojo.TbCities;
import com.dongdongshop.pojo.TbCitiesExample;
import com.dongdongshop.service.CitiesService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@DubboService
public class CitiesServiceImpl implements CitiesService {

    @Autowired
    private TbCitiesMapper tbCitiesMapper;

    @Override
    public List<TbCities> selectByprovinceid(String provinceid) {
        TbCitiesExample example = new TbCitiesExample();
        TbCitiesExample.Criteria criteria = example.createCriteria();
        criteria.andProvinceidEqualTo(provinceid);
        return tbCitiesMapper.selectByExample(example);
    }
}
